package com.tjetc.hw.hw2;

import java.io.FileOutputStream;
import java.io.IOException;

public class hw {
    public static void main(String[] args) throws IOException {
        FileOutputStream fileOutputStream = new FileOutputStream("D:\\b.txt", true);
        String content = "i love java";
        // 将字符串转换为字节数组
        byte[] data = content.getBytes();
        fileOutputStream.write(data);
        fileOutputStream.close();
    }
}
